Skip to content

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Oct 7, 2025

Proposed changes

This change adds the BuildOS field to our product telemetry.

Closes #4037

Blocked by #4008
Should not be merged until feat/inference-extension is merged

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Collected BuildOS for product telemetry

@shaun-nx shaun-nx requested a review from a team as a code owner October 7, 2025 13:47
@github-actions github-actions bot added enhancement New feature or request tests Pull requests that update tests labels Oct 7, 2025
@shaun-nx shaun-nx added the blocked Blocked by other issue label Oct 7, 2025
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.70%. Comparing base (4b85007) to head (3f0b3f3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4038      +/-   ##
==========================================
+ Coverage   86.69%   86.70%   +0.01%     
==========================================
  Files         128      128              
  Lines       16758    16764       +6     
  Branches       62       62              
==========================================
+ Hits        14528    14535       +7     
+ Misses       2045     2044       -1     
  Partials      185      185              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely done, just a couple of small comments

imageSource = "unknown"
}

buildOs := os.Getenv("BUILD_OS")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't you just call this directly in the collector, rather than calling here and passing the var all the way through the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great point! Since I saw the same for imageSource := os.Getenv("BUILD_AGENT") above I figured this was the appropriate way to approach it.

renovate bot and others added 6 commits October 9, 2025 15:43
* Update module google.golang.org/grpc to v1.76.0

| datasource | package                | from    | to      |
| ---------- | ---------------------- | ------- | ------- |
| go         | google.golang.org/grpc | v1.75.1 | v1.76.0 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update files for renovate

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource | package                      | from    | to      |
| ---------- | ---------------------------- | ------- | ------- |
| go         | github.com/prometheus/common | v0.66.1 | v0.67.1 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource  | package              | from    | to      |
| ----------- | -------------------- | ------- | ------- |
| github-tags | github/codeql-action | v3.30.6 | v4.30.7 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update nginx Docker tag to v1.29.2

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| docker     | nginx   | 1.29.1 | 1.29.2 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update README

* Remove package updates

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ciara Stacke <[email protected]>
…38dc (#4039)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file and removed tests Pull requests that update tests labels Oct 9, 2025
@bjee19
Copy link
Contributor

bjee19 commented Oct 9, 2025

@shaun-nx also looks like there is some rebase issue occurring since theres a few additional files

@github-actions github-actions bot added tests Pull requests that update tests and removed documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Oct 9, 2025
@shaun-nx shaun-nx requested review from bjee19 and sjberman October 9, 2025 18:24
//
//go:generate go run -tags generator github.com/nginx/telemetry-exporter/cmd/generator -type=Data -scheme -scheme-protocol=NGFProductTelemetry -scheme-df-datatype=ngf-product-telemetry
type Data struct {
type Data struct { //nolint //required to skip golangci-lint-full fieldalignment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need nolint here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The golangci linter sets a limit on the number of characters allowed in a struct. I can't remember what the exact error was, but it was related to fieldalignment. If I remember correctly the linter errored as we could have had less pointer bytes overall (not 100% sure what that means)

It resolved it by remving the comments around the fields in the struct. The issue with that those comments are required as part of the go generate command when we are generating the data.avdl file for telemetry

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not quite right. The fieldalignment linter helps to optimize Go structs so that they take up less memory in the binary at compilation. The linter automatically fixes these issues by reorganizing the struct to fit the most optimal order, but there's a bug that causes the comments to be removed.

We don't want to nolint here. The solution is either let the linter reorganize, and then manually add the comments back in, or in this case you can probably satisfy the linter by manually putting the BuildOS string alongside the other strings in the struct, because having the same types next to each other helps with the optimization. But we should not ignore these with a nolint.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjberman the issue is that the data.avdl file is auto-generated by this Data struct from the telemetry-exporter. And we can't change the order of the data.avdl elements.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, thanks for the clarification.

@shaun-nx shaun-nx requested review from bjee19 and tataruty October 10, 2025 15:51
Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, nice job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Blocked by other issue enhancement New feature or request release-notes tests Pull requests that update tests

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

OpenShift Support: Product Telemetry

5 participants